package com.zp2.controller.api;

import com.zp2.model.utils.Code;
import com.zp2.service.UtilsService;
import com.zp2.util.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class SmsController {
    @Autowired
    private UtilsService utilsService;

    @PostMapping("/storeCaptcha")
    public Result storeCaptcha(@RequestBody Code code){
        utilsService.storeCaptcha(code);
        return Result.ok();
    }
}
